package com.kongyz;

import com.kongyz.draw.DrawAPI;

/**
 * @author kongyz
 * @date 2018/6/26 22:51
 * @Description:
 */
public class Circle extends Shape {
    private int x,y,radius;

    /**
     * 把接口作为参数，可以再调用的时候传入指定的接口实现类
     * @param x
     * @param y
     * @param radius
     * @param drawAPI
     */
    protected Circle(int x,int y,int radius, DrawAPI drawAPI) {
        super(drawAPI);
        this.x=x;
        this.y=y;
        this.radius=radius;
    }

    @Override
    public void draw() {
        drawAPI.drawCircle(radius,x,y);
    }
}
